package com.test.springCloud.mapper;

import com.test.springcloud.pojo.MenuPojo;
import com.test.springcloud.pojo.RoleNavPojo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author luoxingfa
 * @createdate 2023/5/31 0031 11:07
 * @mood happy
 */
@Mapper
public interface MenuMapper {
    List<RoleNavPojo> getMenuIdByRoleId(@Param("roleId") Integer roleId);
    //根据父类id查询子类
    List<MenuPojo> getRouterByParentId(@Param("parent_id") Integer parent_id);
    //查询所有的菜单
    List<MenuPojo> getAllRouterNoBase();
    List<MenuPojo> getAllRouter();
    //根据用户角色查询菜单，形成菜单树
    List<MenuPojo> getMenuByMenuId(@Param("menuId")Integer menuId);
}
